<%@page import="com.epart.crypt.Base64Coder"%>
<%@page import="javax.crypto.Cipher"%>
<%@page import="com.epart.crypt.EpartCipher"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://jakarta.apache.org/taglibs/string-1.1" prefix="str"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Insert title here</title>
</head>
<body>
<%
String plainText = "1";
String cipherText = "";
String decryptedText = "";
int loop = 500000;
EpartCipher ec = EpartCipher.getInstance();

long start = System.currentTimeMillis();
long end = 0L;
for(int i = 0; i<loop; i++){
	cipherText = ec.encrypt(plainText);
	decryptedText = ec.decrypt(cipherText);
	if( i == loop - 1 ){
		out.println(plainText);
		out.println("<br />");
		out.println(cipherText);
		out.println("<br />");
		out.println(decryptedText);
		out.println("<br />");
	}
}
end = System.currentTimeMillis();
out.println((end - start)/1000.000 );
out.println("<br />");
out.println("<br />");
out.println("<br />");
out.println("<br />");
String test1234 = Base64Coder.encodeString("test1234");
out.println( test1234 );
out.println("<br />");
out.println( Base64Coder.decodeString(test1234) );

%>
</body>
</html>